<WITD application="Work item type editor" version="1.0">
	<WORKITEMTYPE name="Risk">
		<DESCRIPTION>A risk is any probable event or condition that can have a potentially negative outcome on the project in the future.</DESCRIPTION>
		<FIELDS>
			<!-- ********** Core fields ******************* -->
			<FIELD name="Id" refname="System.Id" type="Integer">
			</FIELD>
			<FIELD name="Title" refname="System.Title" type="String">
				<HELPTEXT>Short description of the risk used to differentiate it in a list or report</HELPTEXT>
				<REQUIRED/>
			</FIELD>
			<FIELD name="Assigned To" refname="System.AssignedTo" type="String">
				<VALIDUSER/>
			</FIELD>
			<FIELD name="Area Path" refname="System.AreaPath" type="TreePath">
				<HELPTEXT>The area of the product with which this risk is associated</HELPTEXT>
			</FIELD>
			<FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath">
				<HELPTEXT>The iteration of the product with which this risk is associated</HELPTEXT>
			</FIELD>
			<FIELD name="History" refname="System.History" type="History">
				<HELPTEXT>Discussion thread and other historical information</HELPTEXT>
			</FIELD>
			<FIELD name="State" refname="System.State" type="String">
				<HELPTEXT>The workflow state of the risk</HELPTEXT>
			</FIELD>
			<FIELD name="Reason" refname="System.Reason" type="String">
				<HELPTEXT>The reason why the risk is in the current state</HELPTEXT>
			</FIELD>
			<FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime">
			</FIELD>
			<FIELD name="Changed By" refname="System.ChangedBy" type="String">
				<VALIDUSER/>
			</FIELD>
			<FIELD name="Created Date" refname="System.CreatedDate" type="DateTime">
			</FIELD>
			<FIELD name="Created By" refname="System.CreatedBy" type="String">
			</FIELD>
			<FIELD name="Description" refname="System.Description" type="PlainText">
			</FIELD>
			<!-- *************** Common Fields ****************   -->
			<FIELD name="Issue" refname="Microsoft.VSTS.Common.Issue" type="String" reportable="dimension">
				<HELPTEXT>Used to mark a work item to show up in the issue query.</HELPTEXT>
				<REQUIRED/>
				<ALLOWEDVALUES>
					<LISTITEM value="Yes"/>
					<LISTITEM value="No"/>
				</ALLOWEDVALUES>
				<DEFAULT from="value" value="No"/>
			</FIELD>
			<FIELD name="Exit Criteria" refname="Microsoft.VSTS.Common.ExitCriteria" type="String" reportable="dimension">
				<HELPTEXT>Flag to determine if this work item should be tracked on the project checklist.</HELPTEXT>
				<REQUIRED/>
				<ALLOWEDVALUES>
					<LISTITEM value="Yes"/>
					<LISTITEM value="No"/>
				</ALLOWEDVALUES>
				<DEFAULT from="value" value="No"/>
			</FIELD>
			<FIELD name="State Change Date" refname="Microsoft.VSTS.Common.StateChangeDate" type="DateTime">
				<WHENCHANGED field="System.State">
					<SERVERDEFAULT from="clock"/>
				</WHENCHANGED>
				<WHENNOTCHANGED field="System.State">
					<READONLY/>
				</WHENNOTCHANGED>
			</FIELD>
			<FIELD name="Activated Date" refname="Microsoft.VSTS.Common.ActivatedDate" type="DateTime" reportable="dimension">
				<WHENNOTCHANGED field="System.State">
					<READONLY/>
				</WHENNOTCHANGED>
			</FIELD>
			<FIELD name="Activated By" refname="Microsoft.VSTS.Common.ActivatedBy" type="String" reportable="dimension">
				<WHENNOTCHANGED field="System.State">
					<READONLY/>
				</WHENNOTCHANGED>
			</FIELD>
			<FIELD name="Closed Date" refname="Microsoft.VSTS.Common.ClosedDate" type="DateTime" reportable="dimension">
				<WHENNOTCHANGED field="System.State">
					<READONLY/>
				</WHENNOTCHANGED>
			</FIELD>
			<FIELD name="Closed By" refname="Microsoft.VSTS.Common.ClosedBy" type="String" reportable="dimension">
				<WHENNOTCHANGED field="System.State">
					<READONLY/>
				</WHENNOTCHANGED>
			</FIELD>
			<FIELD name="Rank" refname="Microsoft.VSTS.Common.Rank" type="String" reportable="dimension">
				<HELPTEXT>Stack rank used to prioritize work</HELPTEXT>
			</FIELD>
			<!-- **************** Test Integration Fields *************************************************  -->
			<FIELD name="Test Name" refname="Microsoft.VSTS.Test.TestName" type="String" reportable="detail">
				<HELPTEXT>The name of the test that found this risk</HELPTEXT>
			</FIELD>
			<FIELD name="Test Id" refname="Microsoft.VSTS.Test.TestId" type="String" reportable="detail">
				<HELPTEXT>The Id of the test that found this risk</HELPTEXT>
			</FIELD>
			<FIELD name="Test Path" refname="Microsoft.VSTS.Test.TestPath" type="String" reportable="detail">
				<HELPTEXT>The full pathname of the test that found this risk</HELPTEXT>
			</FIELD>
			<!-- **************** Build Integration Fields ******************************************************  -->
			<FIELD name="Found In" refname="Microsoft.VSTS.Build.FoundIn" type="String" reportable="dimension">
				<HELPTEXT>The build in which the risk was found</HELPTEXT>
				<SUGGESTEDVALUES>
					<LISTITEM value="&lt;None&gt;"/>
				</SUGGESTEDVALUES>
			</FIELD>
			<FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
				<HELPTEXT>The build in which the risk was fixed</HELPTEXT>
				<SUGGESTEDVALUES>
					<LISTITEM value="&lt;None&gt;"/>
				</SUGGESTEDVALUES>
			</FIELD>
			<FIELD name="Severity" refname="Microsoft.VSTS.Common.Severity" type="String">
				<HELPTEXT>How severe is the effect of this this risk on the project.</HELPTEXT>
				<ALLOWEDVALUES>
					<LISTITEM value="Critical"/>
					<LISTITEM value="High"/>
					<LISTITEM value="Medium"/>
					<LISTITEM value="Low"/>
				</ALLOWEDVALUES>
			</FIELD>
		</FIELDS>
		<!-- *************** Workflow ****************   -->
		<WORKFLOW>
			<STATES>
				<STATE value="Active">
					<FIELDS>
						<FIELD refname="Microsoft.VSTS.Common.ClosedDate"><EMPTY/></FIELD>
						<FIELD refname="Microsoft.VSTS.Common.ClosedBy"><EMPTY/></FIELD>
					</FIELDS>
				</STATE>
				<STATE value="Closed">
				</STATE>
			</STATES>
			<TRANSITIONS>
				<TRANSITION from="" to="Active">
					<REASONS>
						<DEFAULTREASON value="New"/>
					</REASONS>
					<FIELDS>
						<FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
							<COPY from="currentuser"/>
							<VALIDUSER/>
							<REQUIRED/>
						</FIELD>
						<FIELD refname="Microsoft.VSTS.Common.ActivatedDate"><SERVERDEFAULT from="clock"/></FIELD>
						<FIELD refname="System.AssignedTo"><DEFAULT from="currentuser"/></FIELD>
					</FIELDS>
				</TRANSITION>
				<TRANSITION from="Active" to="Closed">
					<REASONS>
						<DEFAULTREASON value="Mitigated"/>
						<REASON value="Inactive"/>
						<REASON value="Transferred"/>
						<REASON value="Accepted"/>
						<REASON value="Avoided"/>
					</REASONS>
					<FIELDS>
						<FIELD refname="Microsoft.VSTS.Common.ClosedDate"><SERVERDEFAULT from="clock"/></FIELD>
						<FIELD refname="Microsoft.VSTS.Common.ClosedBy">
							<COPY from="currentuser"/>
							<VALIDUSER/>
							<REQUIRED/>
						</FIELD>
						<FIELD refname="Microsoft.VSTS.Common.ActivatedBy"><READONLY/></FIELD>
						<FIELD refname="Microsoft.VSTS.Common.ActivatedDate"><READONLY/></FIELD>
					</FIELDS>
				</TRANSITION>
				<TRANSITION from="Closed" to="Active">
					<REASONS>
						<DEFAULTREASON value="Reactivated"/>
					</REASONS>
					<FIELDS>
						<FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
							<COPY from="currentuser"/>
							<VALIDUSER/> 
							<REQUIRED/>
						</FIELD>
						<FIELD refname="Microsoft.VSTS.Common.ActivatedDate"><SERVERDEFAULT from="clock"/></FIELD>
						<FIELD refname="System.AssignedTo"><COPY from="field" field="Microsoft.VSTS.Common.ClosedBy"/></FIELD>
					</FIELDS>
				</TRANSITION>
			</TRANSITIONS>
		</WORKFLOW>
		<FORM>
			<!-- Guidelines for updating the form section
				 1) All labels should have mnemonics (you must use &amp; not just &)
				 2) No mnemonics on Tabs or Group Boxes
				 3) Labels must use sentence casing (i.e. "Assigned to:" is correct; "Assigned To:" is wrong)
				 4) No colons in Group Boxes
				 5) Label names should match the field name in whole or in part. They should not be completely different.
				 6) Do not use the same mnemonics on two labels
				 
				 The following mnemonics are common to MSF Agile work items:
				 T -> Title
				 A -> Area
				 I -> Iteration
				 G -> Assigned to
				 S -> State
				 R -> Reason
				 H -> Comment and history
				 U -> Issue
				 B -> Integration build
				 C -> Description
				 K -> Rank
				 
				 The following mnemonics are also used on this work item type
				 V -> Severity
				 D -> Description
				 X -> Exit criteria
			-->
			<Layout>
				<Group>
					<Column PercentWidth="70">
						<Control Type="FieldControl" FieldName="System.Title" Label="&amp;Title:" LabelPosition="Left"/>
					</Column>
					<Column PercentWidth="30">
						<Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Severity" Label="Se&amp;verity:" LabelPosition="Left"/>
					</Column>
				</Group>
				<Group Label="Classification">
					<Column PercentWidth="100">
						<Control Type="WorkItemClassificationControl" FieldName="System.AreaPath" Label="&amp;Area:" LabelPosition="Left"/>
						<Control Type="WorkItemClassificationControl" FieldName="System.IterationPath" Label="&amp;Iteration:" LabelPosition="Left"/>
					</Column>
				</Group>
				<Group Label="Status">
					<Column PercentWidth="50">
						<Control Type="FieldControl" FieldName="System.AssignedTo" Label="Assi&amp;gned to:" LabelPosition="Left"/>
						<Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Rank" Label="Ran&amp;k:" LabelPosition="Left" NumberFormat="WholeNumbers" MaxLength="10"/>
					</Column>
					<Column PercentWidth="50">
						<Control Type="FieldControl" FieldName="System.State" Label="&amp;State:" LabelPosition="Left"/>
						<Control Type="FieldControl" FieldName="System.Reason" Label="&amp;Reason:" LabelPosition="Left"/>
					</Column>
				</Group>
				<TabGroup>
					<Tab Label="Description">
						<Control Type="HtmlFieldControl" FieldName="System.Description" Label="Des&amp;cription:" LabelPosition="Top" Dock="Fill"/>
					</Tab>
					<Tab Label="History">
						<Control Type="WorkItemLogControl" FieldName="System.History" Label="&amp;History:" LabelPosition="Top" Dock="Fill"/>
					</Tab>
					<Tab Label="Links">
						<Control Type="LinksControl"/>
					</Tab>
					<Tab Label="File Attachments">
						<Control Type="AttachmentsControl"/>
					</Tab>
					<Tab Label="Details">
					<Group>
						<Column PercentWidth="50">
							<Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.Issue" Label="Iss&amp;ue:" LabelPosition="Left"/>
						</Column>
						<Column PercentWidth="50">
							<Control Type="FieldControl" FieldName="Microsoft.VSTS.Common.ExitCriteria" Label="E&amp;xit criteria:" LabelPosition="Left"/>
						</Column>
					</Group>	
					</Tab>
				</TabGroup>
			</Layout>
		</FORM>
	</WORKITEMTYPE>
</WITD>
